Skip to content

Inline multipart mark operations - #370

Merged
Kludex merged 4 commits into
mainfrom
inline-multipart-mark-operations
Nov 16, 2026
Merged

Kludex merged 4 commits into
mainfrom
inline-multipart-mark-operations

Conversation

@Kludex

@Kludex Kludex commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

This PR now stands alone against main; it does not require #369 to merge first. The earlier stacked changes are reverted in a new commit to preserve pushed history.

Replace set_mark and delete_mark with the same self.marks assignments and pop(..., None) calls, avoiding two function creations per write(). The net diff changes only python_multipart/multipart.py; callback extraction, header-size validation, tests, and workflows are unchanged from main.

Validation on Python 3.13.18: scripts/check, scripts/test --strict-config --strict-markers (185 tests, 100% coverage), and scripts/rename pass.

Local wall-clock microbenchmarks on CPython 3.13.18, macOS arm64, using the existing benchmark inputs (µs per parse; median of three interleaved comparisons, each taking the best of seven timeit batches):

Input main (9bd038e) Standalone mark operations
Small form 8.30 7.96
Large form 325.09 311.47
8 MB upload 608.10 584.78
Boundary-heavy data 44.73 42.79

These small local differences do not establish a portable speedup; CodSpeed is the independent check.

Additional -W error testing exposes pre-existing unclosed-file warnings in test_upload_dir_with_leading_slash_in_filename, test_file_full_name, and test_file_full_name_with_ext. The same failures reproduce on main (9bd038e) with Python 3.13.18; they are not changed here.

Session: pi --session 01a1e0a2-78a9-7473-86ce-b992bd92cf74

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T08:55:55.171513Z 267a94b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

View guided diff | Re-trigger cubic

@codspeed

codspeed Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 5 untouched benchmarks


Comparing inline-multipart-mark-operations (3c922b0) with main (9bd038e)

Open in CodSpeed

@Kludex
Kludex changed the base branch from extract-multipart-data-callback to main November 16, 2026 09:03

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

View guided diff | Re-trigger cubic

@Kludex
Kludex enabled auto-merge (squash) November 16, 2026 09:05
@Kludex
Kludex merged commit 89a8013 into main Nov 16, 2026
13 checks passed
@Kludex
Kludex deleted the inline-multipart-mark-operations branch November 16, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant